<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
  
<!-- Mirrored from bos.asmhackers.net/docs/filesystems/ntfs/lfs.html by HTTrack Website Copier/3.x [XR&CO'2013], Tue, 07 Oct 2014 11:23:58 GMT -->
<head>
    <title><a href="index-2.html#NTFS" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/index.html#NTFS">NTFS</a> Documentation: Log File Technique</title>
  </head>

  <body>
      <h1><a href="index-2.html#NTFS" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/index.html#NTFS">NTFS</a> Documentation: Log File Technique</h1>

      <h2>Interest</h2>
      <p>

      When you want to write a <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a> on a storage unit, you have to update the <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a> itself plus some tables of the <a href="glossary.html#Filesystem" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#Filesystem">filesystem</a> (say as an example the date of the <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a>). At this point, you need a <a href="glossary.html#Transaction" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#Transaction">transaction</a> made of 2 operations (update the <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a> itself, update the date of the <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a>).
      <p>

      If the <a href="glossary.html#Transaction" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#Transaction">transaction</a> is realized, you are sure that your <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a> is written on the storage unit, and that the <a href="glossary.html#Filesystem" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#Filesystem">filesystem</a> has been left in a defined state.
      <p>

      If the <a href="glossary.html#Transaction" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#Transaction">transaction</a> is not realized (in case of e.g. power failure, or system failure in general), the <a href="glossary.html#Filesystem" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#Filesystem">filesystem</a> is in an undefined state. The only way for you to put it back in a defined (and sane) state (this operation is called a <a name="roll_back">roll-back</a>) is to log in a special <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a>, the log file, which operations of the <a href="glossary.html#Transaction" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#Transaction">transaction</a> have been successfully completed.
      <p>

      <h2>What <a href="javascript:if(confirm('http://www.microsoft.com/ntserver/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.microsoft.com/ntserver/'" tppabs="http://www.microsoft.com/ntserver/">Windows NT&reg;</a> does</h2>
      <p>

      At the first access to the disk after a system failure, the system read the log file and <a href="lfs.html#roll_back" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/lfs.html#roll_back">roll</a>s <a href="lfs.html#roll_back" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/lfs.html#roll_back">back</a> all the operations to the beginning of the last <a href="glossary.html#Transaction" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#Transaction">transaction</a>.

      <h2>What is important with this technique</h2>
      <p>

      <ul>
	<li>When the system writes to the log file, the operation must be atomic and immediate.
	<li>You can put back your <a href="glossary.html#Volume" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#Volume">volume</a> in sane state in a short time which is not related to the size of your disk but only to the complexity of the <a href="glossary.html#Transaction" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#Transaction">transaction</a> that failed.
	    <p>

	    <em>Note</em>: This operation is not performed by the <a href="javascript:if(confirm('http://www.microsoft.com/ntserver/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.microsoft.com/ntserver/'" tppabs="http://www.microsoft.com/ntserver/">Windows NT&reg;</a> <code>chkdsk</code> utility, but by the system: this normal and reliable operation is a feature of <a href="index-2.html#NTFS" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/index.html#NTFS">NTFS</a>.
	    <p>

	<li>If your hardware is reliable, you are sure that you always have access to all the <a href="glossary.html#File" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#File">file</a>s of your <a href="glossary.html#Volume" tppabs="http://www.via.ecp.fr/~regis/ntfs/new/glossary.html#Volume">volume</a>, because it is consistent. But you can't restore eventual data losses. 
      </ul>

      <hr>
      <address><a href="mailto:regis@via.ecp.fr">Regis Duchesne</a> at <a href="javascript:if(confirm('http://www.via.ecp.fr/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.via.ecp.fr/'" tppabs="http://www.via.ecp.fr/">VIA</a>, <a href="javascript:if(confirm('http://www.ecp.fr/  \n\nThis file was not retrieved by Teleport Pro, because it is addressed on a domain or path outside the boundaries set for its Starting Address.  \n\nDo you want to open it from the server?'))window.location='http://www.ecp.fr/'" tppabs="http://www.ecp.fr/">ECP</a>, France</address>
<!-- Created: Sat Dec  7 21:47:33 MET 1996 -->
<!-- hhmts start -->
Last modified: Sun Jan 24 23:40:06 PST 1999
<!-- hhmts end -->
  </body>

<!-- Mirrored from bos.asmhackers.net/docs/filesystems/ntfs/lfs.html by HTTrack Website Copier/3.x [XR&CO'2013], Tue, 07 Oct 2014 11:23:58 GMT -->
</html>
